/*
 * 超管权限菜单配置列表
 * @Author: ljb
 * @Date: 2018-03-26 10:35:06
 * @Last Modified by: ljb
 * @Last Modified time: 2019-03-15 10:25:01
 */
import { $t } from 'src/i18n';

const ROLES = {
	SUPER_ADMIN: 'SUPER_MAN', // value 是后端返回的值
	FINANCE: 'FINANCE',
	CLERK: 'CLERK',
};

export default [
	{
		name: '/admin/staff',
		icon: 'person-stalker',
		text: $t('menus.staff_management'),
		key: 'admin-staff',
		can_access_roles: [ROLES.SUPER_ADMIN],
	},
	{
		name: '/admin/customer',
		icon: 'person-add',
		text: $t('menus.customer_management'),
		key: 'admin-customer',
		can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
	},
	{
		name: '1',
		icon: 'wrench',
		text: $t('menus.device_management'),
		key: 'admin-equipment',
		can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
		submenus: [
			{
				name: '/admin/equipment',
				icon: 'wrench',
				text: $t('menus.add_device_management'),
				key: 'admin-equipment',
				can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			},
			{
				name: '/admin/machine-parameters',
				icon: 'tshirt',
				key: 'machine-parameters',
				text: $t('menus.machine_parameters_management'),
				can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			},
			{
				name: '/admin/supplies-management',
				icon: 'briefcase',
				key: 'supplies-management',
				text: $t('menus.supplies_management'),
				can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			},
			{
				name: '/admin/account-overview',
				icon: 'help-buoy',
				key: 'account-overview',
				text: $t('menus.account_overview'),
				can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			},
		],
	},
	{
		name: '/admin/product-management',
		icon: 'ios-keypad-outline',
		text: $t('menus.product_management'),
		can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
		submenus: [
			{
				name: '/admin/product-brand',
				icon: 'film-marker',
				key: 'admin-product-brand',
				text: $t('menus.product_brand'), // '产品品牌',
				can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			},
			{
				name: '/admin/product-tag',
				icon: 'pricetags',
				key: 'product-tag',
				text: $t('menus.product_tag'), // '产品标签',
				can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			},
			{
				name: '/admin/product',
				icon: 'navicon-round',
				key: 'admin-product',
				text: $t('menus.product_list'),
			},
			{
				name: '/admin/product-category',
				icon: 'help-buoy',
				key: 'admin-product-category',
				text: $t('menus.product_category'), // ''产品分类',
				can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			},
			// {
			//     name:"/admin/product-model",
			//     icon:"navicon-round",
			//     key: 'product-model',
			//     text:'产品模型'
			// },
			// {
			// 	name: '/admin/product-specification',
			// 	icon: 'navicon-round',
			// 	key: 'product-specification',
			// 	text: '产品规格',
			// 	can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			// },
			// {
			// 	name: '/admin/product-attribute',
			// 	icon: 'navicon-round',
			// 	key: 'product-attribute',
			// 	text: '产品属性',
			// 	can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
			// },
		],
	},
	{
		name: '/admin/activity-management',
		icon: 'ios-analytics',
		key: 'activity-management',
		text: $t('menus.activity_management'), // 活动管理
		can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
	},
	{
		name: '/admin/test-product-label',
		icon: 'ios-list',
		key: 'test-product-label',
		text: $t('menus.product_label_management'), // 检测项关联产品标签的管理
		can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
	},
	{
		name: '/admin/operate-log',
		icon: 'ios-list',
		key: 'operate-log',
		text: $t('menus.operate_log'), // 操作日志
		can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
	},
	// {
	// 	name: '/v-debug/example',
	// 	icon: 'bug',
	// 	key: 'v-debug',
	// 	text: 'debug页面', // debug页面
	// 	can_access_roles: [ROLES.SUPER_ADMIN, ROLES.CLERK],
	// },
];
